package com.fh.shop.api.sms.controller;

import com.alibaba.fastjson.JSON;
import com.fh.shop.api.common.ServerResponse;
import com.fh.shop.api.sms.biz.ISMSService;
import com.fh.shop.api.sms.vo.SMSVo;
import com.fh.shop.api.util.SMSUtil;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/sms")
public class SMSController {

    @Resource(name = "smsService")
    private ISMSService smsService;

    @PostMapping
    public ServerResponse sendMsg(String phone) {
        return smsService.sendMsg(phone);
    }
}
